diff -Nuar a/src/ffmpeg.imageio/ffmpeginput.cpp b/src/ffmpeg.imageio/ffmpeginput.cpp
--- a/src/ffmpeg.imageio/ffmpeginput.cpp	2018-03-01 08:49:23.000000000 +0300
+++ b/src/ffmpeg.imageio/ffmpeginput.cpp	2018-04-27 01:05:14.877091949 +0300
@@ -124,6 +124,15 @@
 }
 #endif
 
+
+// Changes for ffmpeg 4.0
+#define USE_FFMPEG_4_0 (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 18, 100))
+
+#if USE_FFMPEG_4_0
+#  define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY
+#endif
+
+
 #include <boost/thread/once.hpp>
 
 #include <OpenImageIO/imageio.h>
@@ -136,12 +145,12 @@
 public:
     FFmpegInput ();
     virtual ~FFmpegInput();
-    virtual const char *format_name (void) const { return "FFmpeg movie"; }
-    virtual bool open (const std::string &name, ImageSpec &spec);
-    virtual bool close (void);
-    virtual int current_subimage (void) const { return m_subimage; }
-    virtual bool seek_subimage (int subimage, int miplevel, ImageSpec &newspec);
-    virtual bool read_native_scanline (int y, int z, void *data);
+    virtual const char *format_name (void) const override { return "FFmpeg movie"; }
+    virtual bool open (const std::string &name, ImageSpec &spec) override;
+    virtual bool close (void) override;
+    virtual int current_subimage (void) const override { return m_subimage; }
+    virtual bool seek_subimage (int subimage, int miplevel, ImageSpec &newspec) override;
+    virtual bool read_native_scanline (int y, int z, void *data) override;
     void read_frame(int pos);
 #if 0
     const char *metadata (const char * key);
